<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<script type="text/javascript">
$(document).ready(function() {
	$.ajax({
		url: '${base}/admin/photo/getType',
		cache: false,
		async:false,
		dataType: 'json',
		type: "post",
		error: function() {
		},
		success: function(data) {
			$.each(data, function(index, item) {
				$("#photoTypeList").append("<option value="+item.id+">"+item.name+"</option>");
			});
		}
	});

});
</script>
<!--  
<div style="float:right; margin:10px">
	<div id="fileQueue" class="fileQueue"></div>
	<input id="testFileInput" type="file" name="image" 
		uploader="${base}/uploadify/scripts/uploadify.swf"
		cancelImg="${base}/uploadify/cancel.png" 
		script="${base}/admin/photo/upload" 
		scriptData="{PhotoSession:HttpSession.getId()}"
		fileQueue="fileQueue"
		folder="${base}/upload"
		onAllComplete="uploadifyAllComplete" />
</div>
-->
<form method="post" action="${base}/admin/photo/upload" class="pageForm required-validate" enctype="multipart/form-data" onsubmit="return iframeCallback(this, dialogAjaxDone);">
	<div class="pageContent">
		<div class="pageFormContent" layoutH="56">
			<table border="0">
				<tr style="height: 30px;">
					<td><label>上传文件所属分类目录：</label></td>
					<td><select id="photoTypeList" class="combox"
						name="picture.typeId"></select></td>
				</tr>
				<tr style="height: 30px;">
					<td><label>上传文件：</label></td>
					<td><input type="file" name="photo" /></td>
				</tr>
				<tr style="height: 30px;">
					<td><label>标题：</label></td>
					<td><input type="text" name="picture.title" /> <input
						type="hidden" name="picture.userId" value="${user.id }" /></td>
				</tr>
				<tr style="height: 30px;">
					<td><label>描述：</label></td>
					<td><textarea name="picture.description" cols="30" rows="5"
							alt="请输入该相片的描述"></textarea></td>
				</tr>
			</table>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">上传</button>
						</div>
					</div></li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</div>
</form>




<!-- 
<div class="pageContent">
		<div class="pageFormContent" layoutH="56">
			<table border="0" >
				<tr style="height: 30px;">
					<td><label>请选择要上传的分类目录：</label>
					</td>
					<td><select id="photoTypeList" class="combox" name="photo.Id">
						<option value="${obj.id==null?0:obj.id }"></option>
					</select>
					</td>
				</tr>
			</table>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div>
				</li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div></li>
			</ul>
		</div>
</div>
 -->
		
